{%- extends "base.html" %}

{%- block title %}
{% trans %}Sign up{% endtrans %}
{%- endblock %}

{%- block subtitle %}
{% trans %}pick a domain for the new account{% endtrans %}
{%- endblock %}

{%- block content %}
{%- call macros.table(order='[[1,"asc"]]') %}
<thead>
  <tr>
    <th>{% trans %}Domain{% endtrans %}</th>
    <th>{% trans %}Available slots{% endtrans %}</th>
    <th>{% trans %}Quota{% endtrans %}</th>
  </tr>
</thead>
<tbody>
{%- for domain_name, domain in available_domains.items() %}
<tr>
  <td><a href="{{ url_for('.user_signup', domain_name=domain_name) }}">{{ domain_name }}</a></td>
  <td data-sort="{{ -1 if domain.max_users == -1 else domain.max_users - (domain.users | count)}}">{{ '∞' if domain.max_users == -1 else domain.max_users - (domain.users | count)}}</td>
  <td data-sort="{{ domain.max_quota_bytes or config['DEFAULT_QUOTA'] }}">{{ domain.max_quota_bytes or config['DEFAULT_QUOTA'] | filesizeformat }}</td>
</tr>
{%- endfor %}
</tbody>
{%- endcall %}
{%- endblock %}
